def login(username, password):
    """这是开发写的"""
    if len(password) != 6:
        print("密码不正确")
        return False
    if username != 'shang' or password != '123456':
        return False
    return True



# 测试写的代码
class LoginCase:

    def __init__(self, title=None, expected=None):
        self.title = title
        self.expected = expected

    def run(self, username, password):
        actual = login(username, password)
        if self.expected == actual:
            print("测试用例通过")
        else:
            print("测试用例不通过")


case = LoginCase(expected=True)
case.run("shang", "123456")
